package com.mars.boss.weixin.vo;

import java.io.Serializable;
import java.util.Date;

import com.mars.base.common.utils.date.DateUtils;
import com.mars.boss.weixin.entity.WxOAuthUser;

public class WxOAuthUserVo extends WxOAuthUser implements Serializable {

	private static final long serialVersionUID = 1L;
	
	/**
	 * 日期范围：2014-04-12 至 2015-01-30
	 */
	private String dataRange ;
	
	/**
	 * 开始日期
	 */
	private Date startDate ;
	
	/**
	 * 结束日期
	 */
	private Date endDate ;

	public String getDataRange() {
		return dataRange;
	}

	public void setDataRange(String dataRange) {
		this.dataRange = dataRange;
	}

	public Date getStartDate() {
		if(null != this.dataRange) {
			startDate = DateUtils.parseDate(this.getDataRange().replaceAll(" ", "").split("至")[0]) ;
		}
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		if(null != this.dataRange) {
			endDate = DateUtils.parseDate(this.getDataRange().replaceAll(" ", "").split("至")[1]) ;
		}
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
}